package com.darrenchan.leetcode;

/**
 * @Desc
 * @Author chenchi03
 * @CreateTime 2020-03-26 09:17
 */
public class MN {
    //dp[m][n] = dp[m - 1][n - 1] + dp[m - n][n]
    public static int f(int m, int n) {
        if(m < n) {
            return 0;
        }

        if(n == 1) {
            return 1;
        }
        return f(m - 1, n - 1) + f(m - n, n);
    }

    public static void main(String[] args) {
        System.out.println(f(7, 2));
    }
}
